import { createSlice, PayloadAction, Dispatch } from '@reduxjs/toolkit'
const userSlice = createSlice({
    name: 'demoSlice',
    initialState: {
        userIfo: {}
    },
    reducers: {
        setState(state: any, { payload }: PayloadAction<any[]>) {
            console.log('payload', payload);

            state.userIfo = payload
        }
    },

})
export default userSlice.reducer
export const { setState } = userSlice.actions